package com.more.offer.exercise.jdkproxy01;

/**
 * @author pinoc
 * @date 2021/8/9
 * @description
 */
public class ProxyMainTest {
	public static void main(String[] args) {
		System.getProperties().put("sun.misc.ProxyGenerator.saveGeneratedFiles", "true");
		IBusinessService businessService = new BusinessServiceImpl();
		MyInvocationHandler proxyHandler = new MyInvocationHandler(businessService);
		IBusinessService proxy = proxyHandler.getProxy();
		proxy.doBusiness();
	}
}
